package com.bweab.util;

import java.util.ArrayList;
import java.util.List;

public class PageList <T>{

    //前后端通信状态码
    private int statusCode;
    //前后端通信的响应体

    //定义前后端通信的信息
    private String message;

    private int page;//当前页
    private int pageTotal;//总页数
    private int pageSize;//每页条数
    //泛型集合
    private List<T> pageList=new ArrayList<>();

    public PageList() {
    }

    public PageList(int statusCode, String message, int page, int pageTotal, int pageSize, List<T> pageList) {
        this.statusCode = statusCode;

        this.message = message;
        this.page = page;
        this.pageTotal = pageTotal;
        this.pageSize = pageSize;
        this.pageList = pageList;
    }

    public int getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(int statusCode) {
        this.statusCode = statusCode;
    }



    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getPageTotal() {
        return pageTotal;
    }

    public void setPageTotal(int pageTotal) {
        this.pageTotal = pageTotal;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public List<T> getPageList() {
        return pageList;
    }

    public void setPageList(List<T> pageList) {
        this.pageList = pageList;
    }

    @Override
    public String toString() {
        return "PageList{" +
                "page=" + page +
                ", pageTotal=" + pageTotal +
                ", pageSize=" + pageSize +
                ", pageList=" + pageList +
                '}';
    }
}
